/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pkgjeudestrategie;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Toolkit;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.Serializable;
import pkgjeudestrategie.ressource.Ressource;

/**
 *
 * @author Admin
 */

//Foret, marais, etc... ralentissement des soldats
public class TerrainDifficile extends Terrain implements Serializable{

    boolean isClicked = false;
    private ContourZone contour = new ContourZone(this);
    //Image img =img = Toolkit.getDefaultToolkit().createImage("");

    public TerrainDifficile() {
        add(contour);
        setSize(400,400);


        addMouseListener(new MouseAdapter() {

            @Override
            public void mouseClicked(MouseEvent e) {
                isClicked = true;
            }
        });
    }
    public void zoom(int size){
        super.zoom(size);
            contour.zoom(size);
        
        
    }
    public boolean isZoneInfranchissable() {
        return true;
    }

    public void paintComponent(Graphics g) {
        if (isClicked) {
            g.setColor(new Color(120, 10, 170));
        } else {
            g.setColor(Color.PINK);
        }

        g.fillRect(0, 0, getWidth(), getHeight());

    }

    @Override
    public boolean isZoneLibre() {
        return false;
    }

    @Override
    public boolean isClicked() {
        return isClicked;
    }

    @Override
    public void setClicked(boolean b) {
        isClicked = b;
    }

    @Override
    public int getState(int player) {
        return 5;
    }

    @Override
    public String getName() {
        return "Terrain Difficile";
    }

    @Override
    public Batiment[] getBatiment() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void construire(int i) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void detruire(int i) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void privatiser(int i) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void nationaliser(int i) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void upgradeRessource(int i) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void timeUpgrade() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public boolean noSuchBuilding(int i) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public int getRessourceToInt(int i) {
        throw new UnsupportedOperationException("Not supported yet.");
    }


    @Override
    public int getquantiteDeTour() {
        return 2;
    }


    @Override
    public int getDepenseBatiment(int i) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public int getDepenseRessource(int i) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public Ressource[] getRessources() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void removePopulation(int choice) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void actualizePopulation(Faction f,boolean b) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public boolean isLiving() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

}
